package jpb.module.dao.follow;

import jpb.module.dao.follow.mapper.OrganizeFollowMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**
 * Created by haol on 2017/5/9.
 */
@Repository
public class OrganizeFollowDao {

        @Autowired
        private OrganizeFollowMapper mapper;

        private Logger logger = LoggerFactory.getLogger(OrganizeFollowDao.class);


       public void add(String oid, String num){
               try {
                        mapper.add(oid,num);
               }catch (Exception e){
                       logger.error(e.getMessage());
               }
        }

        public void delete( String oid,  String num){
                try {
                        mapper.delete(oid,num);
                }catch (Exception e){
                        logger.error(e.getMessage());
                }
        }
        public Integer get( String oid,  String num){
                try {
                        return mapper.get(oid,num);
                }catch (Exception e){
                        logger.error(e.getMessage());
                        return null;
                }
        }
        public  void deleteByOid( String oid){
                try {
                        mapper.deleteByOid(oid);
                }catch (Exception e){
                        logger.error(e.getMessage());
                }
        }



}
